home *** CD-ROM | disk | FTP | other *** search
- ' default.vbs: Default NetStumbler event handler script.
- ' Copyright (c) Marius Milner 2002-2003.
- ' This file may not be redistributed without the author's permission.
-
-
- ' Called when user requests that scanning start, or when scanning is started automatically.
- 'Sub OnEnableScan
- ' PlaySound "SSROAM.WAV"
- 'End Sub
-
-
- ' Called when user requests that scanning stop.
- 'Sub OnDisableScan
- ' PlaySound "SSROAM.WAV"
- 'End Sub
-
-
- ' Called when a scan cycle is starting.
- 'Sub OnScanStart
- ' PlaySound "Windows XP Balloon.WAV"
- 'End Sub
-
-
- ' Called when a scan result is received.
- ' History: Supported since 0.4
- 'Sub OnScanResult(SSID, BSSID, CapFlags, Signal, Noise, LastSeen)
- ' SSID : String : SSID (Network name)
- ' BSSID : String : BSSID (MAC address)
- ' CapFlags : Integer : 802.11 capability flags
- ' Signal : Integer : signal level (dBm)
- ' Noise : Integer : noise level(dBm)
- ' LastSeen : Time : When this BSSID was last seen
-
- 'End Sub
-
-
- ' Called when a scan cycle has completed (typically right before a new one starts).
- Sub OnScanComplete(FoundNew, SeenBefore, LostContact, BestSNR)
- ' FoundNew : Integer : Count of new BSSIDs
- ' SeenBefore : Integer : Count of not-new BSSIDs
- ' LostContact : Integer : Count of BSSIDs missed since last scan
- ' BestSNR : Integer : SNR of strongest signal (dBm)
-
- If FoundNew>0 Then
- PlaySound "ns-aos-new.WAV"
- ElseIf LostContact>0 Then
- PlaySound "ns-los.WAV"
- ElseIf SeenBefore>0 Then
- ' Still seeing some
- If BestSNR >= 60 Then
- PlaySound "ns-signal-6.WAV"
- ElseIf BestSNR >= 50 Then
- PlaySound "ns-signal-5.WAV"
- ElseIf BestSNR >= 40 Then
- PlaySound "ns-signal-4.WAV"
- ElseIf BestSNR >= 30 Then
- PlaySound "ns-signal-3.WAV"
- ElseIf BestSNR >= 20 Then
- PlaySound "ns-signal-2.WAV"
- ElseIf BestSNR >= 10 Then
- PlaySound "ns-signal-1.WAV"
- Else
- PlaySound "ns-signal-0.WAV"
- End If
- Else
- ' Nothing seen
- ' PlaySound "ns-tick.WAV"
- End If
- End Sub
-
-
- Dim GPSOk
- GPSOk = True
-
-
- ' Called when GPS times out.
- Sub OnGPSTimeout
- If GPSOk Then
- GPSOk = False
- PlaySound "ns-gps-err.WAV"
- End If
- End Sub
-
-
- ' Called when GPS reports no fix.
- Sub OnGPSNoFix
- If GPSOk Then
- GPSOk = False
- PlaySound "ns-gps-err.WAV"
- End If
- End Sub
-
-
- ' Called when GPS reports position.
- Sub OnGPSPosition (Lat, Lon, Alt)
- ' Lat : double : Latitude, degrees east
- ' Lon : double : Longitude, degrees north
- ' Alt : double : Altitude above sea level, meters
- GPSOk = True
- End Sub
-
-
- ' Called when GPS reports speed.
- 'Sub OnGPSSpeed (Speed)
- ' Speed : double : Speed, knots
- 'End Sub
-
-
- ' Called WHILE SCANNING ONLY when the IP address is reported to be changed.
- ' The IP address reported is the first one on the currently scanning adapter.
- ' NOTE: There are a number of cases where this function will get called but
- ' the IP address has not really changed - for example, the address changed
- ' on another adapter, or the IP routing or DNS information changed.
- ' Platforms supported: NetStumbler; MiniStumbler on PPC2002.
- ' History: New in 0.4.
- 'Sub OnIPChange (Addr, Mask)
- ' Addr : String : IP address, dotted format
- ' Mask : String : IP subnet mask, dotted format
- 'End Sub
-
- ' Called to indicate that NetStumbler has changed its location information
- ' for a BSSID.
- ' History: New in 0.4.
- 'Sub OnPositionChange (SSID, BSSID, CapFlags, MaxSNR, Lat, Lon, Alt, FixType)
- ' SSID : String : SSID (Network name)
- ' BSSID : String : BSSID (MAC address)
- ' CapFlags : Integer : 802.11 capability flags
- ' MaxSNR: Integer : highest seen signal-to-noise ratio (dB) that had a position fix associated with it
- ' Lat : Double : Newly calculated latitude, degrees
- ' Lon : Double : Newly calculated longitude, degrees
- ' Alt : Double : Newly calculated altitude (currently not calculated)
- ' FixType : Integer : Reserved for future use.
- 'End Sub
-
-